package com.zlm.user.emp.dao;

import com.zlm.common.base.BaseDao;
import com.zlm.common.entity.EmpPunchDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 员工考勤DAO
 * @Author: duyufu
 * @Date: 2019/5/27 10:53
 */
@Repository
public interface EmpPunchDao extends BaseDao<EmpPunchDO> {

    List<EmpPunchDO> queryEmpPunchByMap(Map<String, Object> map);

    List<Map<String, Object>> queryEmpPunchList(Map<String, Object> map);

    List<EmpPunchDO> selectEmpPunchList(@Param("empId") Integer empId,@Param("beginDate") Date beginDate,
                                        @Param("endDate") Date endDate);

    /**
     * 批量插入员工考勤信息
     * @param punchList
     */
    void insertEmpPunchList(@Param("punchList") List<EmpPunchDO> punchList);

    /**
     * 更新员工考勤
     * @param empPunchDO
     */
    void updateEmpPunch(EmpPunchDO empPunchDO);

    /**
     * 查看打卡次数
     * @param countMap
     * @return
     */
    int countPunch(Map<String, Object> countMap);
}
